home *** CD-ROM | disk | FTP | other *** search
- Path: odi.com!usenet
- From: Kimberley Burchett <burchett>
- Newsgroups: comp.lang.c++
- Subject: Duplication of Prototypes
- Date: 2 Jan 1996 23:59:02 GMT
- Organization: Software Leverage, Inc
- Message-ID: <4ccgs6$qnk@mastermind.odi.com>
- NNTP-Posting-Host: loon.odi.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (X11; I; SunOS 4.1.3 sun4c)
- X-URL: news:comp.lang.c++
-
- Here's what I'm talking about:
-
- class Base
- {
- public:
- virtual void do_something(param list);
- };
-
- class Derived : public Base
- {
- public:
- virtual void do_something(param list);
- };
-
- class Embedded
- {
- Base base;
- public:
- // one-line function calls base.do_something()
- virtual void do_something(param list);
- };
-
- ... now try changing the param list or the return value.
- You'll have to change six files (three headers, three sources).
- And if Base turns out to be one of those truly useful classes
- that gets used all over, then woe until you.
-
- Does anybody have any techniques for dealing with this that
- don't involve using a smarter editor?
-
- Kimberley
-
- please cc any responses to burchett@odi.com
-
-